Left Termination of the query pattern minus_in_3(g, a, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

p(0, 0).
p(s(X), X).
le(0, Y, true).
le(s(X), 0, false).
le(s(X), s(Y), B) :- le(X, Y, B).
minus(X, Y, Z) :- ','(le(X, Y, B), if(B, X, Y, Z)).
if(true, X, Y, 0).
if(false, X, Y, s(Z)) :- ','(p(X, X1), minus(X1, Y, Z)).

Queries:

minus(g,a,a).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

minus_in(X, Y, Z) → U2(X, Y, Z, le_in(X, Y, B))
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)
U2(X, Y, Z, le_out(X, Y, B)) → U3(X, Y, Z, if_in(B, X, Y, Z))
if_in(false, X, Y, s(Z)) → U4(X, Y, Z, p_in(X, X1))
p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
U4(X, Y, Z, p_out(X, X1)) → U5(X, Y, Z, minus_in(X1, Y, Z))
U5(X, Y, Z, minus_out(X1, Y, Z)) → if_out(false, X, Y, s(Z))
if_in(true, X, Y, 0) → if_out(true, X, Y, 0)
U3(X, Y, Z, if_out(B, X, Y, Z)) → minus_out(X, Y, Z)

The argument filtering Pi contains the following mapping:
minus_in(x1, x2, x3)  =  minus_in(x1)
U2(x1, x2, x3, x4)  =  U2(x1, x4)
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
U3(x1, x2, x3, x4)  =  U3(x4)
if_in(x1, x2, x3, x4)  =  if_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
minus_out(x1, x2, x3)  =  minus_out(x3)
if_out(x1, x2, x3, x4)  =  if_out(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

minus_in(X, Y, Z) → U2(X, Y, Z, le_in(X, Y, B))
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)
U2(X, Y, Z, le_out(X, Y, B)) → U3(X, Y, Z, if_in(B, X, Y, Z))
if_in(false, X, Y, s(Z)) → U4(X, Y, Z, p_in(X, X1))
p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
U4(X, Y, Z, p_out(X, X1)) → U5(X, Y, Z, minus_in(X1, Y, Z))
U5(X, Y, Z, minus_out(X1, Y, Z)) → if_out(false, X, Y, s(Z))
if_in(true, X, Y, 0) → if_out(true, X, Y, 0)
U3(X, Y, Z, if_out(B, X, Y, Z)) → minus_out(X, Y, Z)

The argument filtering Pi contains the following mapping:
minus_in(x1, x2, x3)  =  minus_in(x1)
U2(x1, x2, x3, x4)  =  U2(x1, x4)
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
U3(x1, x2, x3, x4)  =  U3(x4)
if_in(x1, x2, x3, x4)  =  if_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
minus_out(x1, x2, x3)  =  minus_out(x3)
if_out(x1, x2, x3, x4)  =  if_out(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

MINUS_IN(X, Y, Z) → U21(X, Y, Z, le_in(X, Y, B))
MINUS_IN(X, Y, Z) → LE_IN(X, Y, B)
LE_IN(s(X), s(Y), B) → U11(X, Y, B, le_in(X, Y, B))
LE_IN(s(X), s(Y), B) → LE_IN(X, Y, B)
U21(X, Y, Z, le_out(X, Y, B)) → U31(X, Y, Z, if_in(B, X, Y, Z))
U21(X, Y, Z, le_out(X, Y, B)) → IF_IN(B, X, Y, Z)
IF_IN(false, X, Y, s(Z)) → U41(X, Y, Z, p_in(X, X1))
IF_IN(false, X, Y, s(Z)) → P_IN(X, X1)
U41(X, Y, Z, p_out(X, X1)) → U51(X, Y, Z, minus_in(X1, Y, Z))
U41(X, Y, Z, p_out(X, X1)) → MINUS_IN(X1, Y, Z)

The TRS R consists of the following rules:

minus_in(X, Y, Z) → U2(X, Y, Z, le_in(X, Y, B))
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)
U2(X, Y, Z, le_out(X, Y, B)) → U3(X, Y, Z, if_in(B, X, Y, Z))
if_in(false, X, Y, s(Z)) → U4(X, Y, Z, p_in(X, X1))
p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
U4(X, Y, Z, p_out(X, X1)) → U5(X, Y, Z, minus_in(X1, Y, Z))
U5(X, Y, Z, minus_out(X1, Y, Z)) → if_out(false, X, Y, s(Z))
if_in(true, X, Y, 0) → if_out(true, X, Y, 0)
U3(X, Y, Z, if_out(B, X, Y, Z)) → minus_out(X, Y, Z)

The argument filtering Pi contains the following mapping:
minus_in(x1, x2, x3)  =  minus_in(x1)
U2(x1, x2, x3, x4)  =  U2(x1, x4)
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
U3(x1, x2, x3, x4)  =  U3(x4)
if_in(x1, x2, x3, x4)  =  if_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
minus_out(x1, x2, x3)  =  minus_out(x3)
if_out(x1, x2, x3, x4)  =  if_out(x4)
P_IN(x1, x2)  =  P_IN(x1)
U51(x1, x2, x3, x4)  =  U51(x4)
LE_IN(x1, x2, x3)  =  LE_IN(x1)
U31(x1, x2, x3, x4)  =  U31(x4)
U41(x1, x2, x3, x4)  =  U41(x4)
MINUS_IN(x1, x2, x3)  =  MINUS_IN(x1)
IF_IN(x1, x2, x3, x4)  =  IF_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x1, x4)
U11(x1, x2, x3, x4)  =  U11(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

MINUS_IN(X, Y, Z) → U21(X, Y, Z, le_in(X, Y, B))
MINUS_IN(X, Y, Z) → LE_IN(X, Y, B)
LE_IN(s(X), s(Y), B) → U11(X, Y, B, le_in(X, Y, B))
LE_IN(s(X), s(Y), B) → LE_IN(X, Y, B)
U21(X, Y, Z, le_out(X, Y, B)) → U31(X, Y, Z, if_in(B, X, Y, Z))
U21(X, Y, Z, le_out(X, Y, B)) → IF_IN(B, X, Y, Z)
IF_IN(false, X, Y, s(Z)) → U41(X, Y, Z, p_in(X, X1))
IF_IN(false, X, Y, s(Z)) → P_IN(X, X1)
U41(X, Y, Z, p_out(X, X1)) → U51(X, Y, Z, minus_in(X1, Y, Z))
U41(X, Y, Z, p_out(X, X1)) → MINUS_IN(X1, Y, Z)

The TRS R consists of the following rules:

minus_in(X, Y, Z) → U2(X, Y, Z, le_in(X, Y, B))
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)
U2(X, Y, Z, le_out(X, Y, B)) → U3(X, Y, Z, if_in(B, X, Y, Z))
if_in(false, X, Y, s(Z)) → U4(X, Y, Z, p_in(X, X1))
p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
U4(X, Y, Z, p_out(X, X1)) → U5(X, Y, Z, minus_in(X1, Y, Z))
U5(X, Y, Z, minus_out(X1, Y, Z)) → if_out(false, X, Y, s(Z))
if_in(true, X, Y, 0) → if_out(true, X, Y, 0)
U3(X, Y, Z, if_out(B, X, Y, Z)) → minus_out(X, Y, Z)

The argument filtering Pi contains the following mapping:
minus_in(x1, x2, x3)  =  minus_in(x1)
U2(x1, x2, x3, x4)  =  U2(x1, x4)
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
U3(x1, x2, x3, x4)  =  U3(x4)
if_in(x1, x2, x3, x4)  =  if_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
minus_out(x1, x2, x3)  =  minus_out(x3)
if_out(x1, x2, x3, x4)  =  if_out(x4)
P_IN(x1, x2)  =  P_IN(x1)
U51(x1, x2, x3, x4)  =  U51(x4)
LE_IN(x1, x2, x3)  =  LE_IN(x1)
U31(x1, x2, x3, x4)  =  U31(x4)
U41(x1, x2, x3, x4)  =  U41(x4)
MINUS_IN(x1, x2, x3)  =  MINUS_IN(x1)
IF_IN(x1, x2, x3, x4)  =  IF_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x1, x4)
U11(x1, x2, x3, x4)  =  U11(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LE_IN(s(X), s(Y), B) → LE_IN(X, Y, B)

The TRS R consists of the following rules:

minus_in(X, Y, Z) → U2(X, Y, Z, le_in(X, Y, B))
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)
U2(X, Y, Z, le_out(X, Y, B)) → U3(X, Y, Z, if_in(B, X, Y, Z))
if_in(false, X, Y, s(Z)) → U4(X, Y, Z, p_in(X, X1))
p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
U4(X, Y, Z, p_out(X, X1)) → U5(X, Y, Z, minus_in(X1, Y, Z))
U5(X, Y, Z, minus_out(X1, Y, Z)) → if_out(false, X, Y, s(Z))
if_in(true, X, Y, 0) → if_out(true, X, Y, 0)
U3(X, Y, Z, if_out(B, X, Y, Z)) → minus_out(X, Y, Z)

The argument filtering Pi contains the following mapping:
minus_in(x1, x2, x3)  =  minus_in(x1)
U2(x1, x2, x3, x4)  =  U2(x1, x4)
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
U3(x1, x2, x3, x4)  =  U3(x4)
if_in(x1, x2, x3, x4)  =  if_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
minus_out(x1, x2, x3)  =  minus_out(x3)
if_out(x1, x2, x3, x4)  =  if_out(x4)
LE_IN(x1, x2, x3)  =  LE_IN(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LE_IN(s(X), s(Y), B) → LE_IN(X, Y, B)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LE_IN(x1, x2, x3)  =  LE_IN(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LE_IN(s(X)) → LE_IN(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

IF_IN(false, X, Y, s(Z)) → U41(X, Y, Z, p_in(X, X1))
U41(X, Y, Z, p_out(X, X1)) → MINUS_IN(X1, Y, Z)
U21(X, Y, Z, le_out(X, Y, B)) → IF_IN(B, X, Y, Z)
MINUS_IN(X, Y, Z) → U21(X, Y, Z, le_in(X, Y, B))

The TRS R consists of the following rules:

minus_in(X, Y, Z) → U2(X, Y, Z, le_in(X, Y, B))
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)
U2(X, Y, Z, le_out(X, Y, B)) → U3(X, Y, Z, if_in(B, X, Y, Z))
if_in(false, X, Y, s(Z)) → U4(X, Y, Z, p_in(X, X1))
p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
U4(X, Y, Z, p_out(X, X1)) → U5(X, Y, Z, minus_in(X1, Y, Z))
U5(X, Y, Z, minus_out(X1, Y, Z)) → if_out(false, X, Y, s(Z))
if_in(true, X, Y, 0) → if_out(true, X, Y, 0)
U3(X, Y, Z, if_out(B, X, Y, Z)) → minus_out(X, Y, Z)

The argument filtering Pi contains the following mapping:
minus_in(x1, x2, x3)  =  minus_in(x1)
U2(x1, x2, x3, x4)  =  U2(x1, x4)
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
U3(x1, x2, x3, x4)  =  U3(x4)
if_in(x1, x2, x3, x4)  =  if_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
minus_out(x1, x2, x3)  =  minus_out(x3)
if_out(x1, x2, x3, x4)  =  if_out(x4)
U41(x1, x2, x3, x4)  =  U41(x4)
MINUS_IN(x1, x2, x3)  =  MINUS_IN(x1)
IF_IN(x1, x2, x3, x4)  =  IF_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x1, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

IF_IN(false, X, Y, s(Z)) → U41(X, Y, Z, p_in(X, X1))
U41(X, Y, Z, p_out(X, X1)) → MINUS_IN(X1, Y, Z)
U21(X, Y, Z, le_out(X, Y, B)) → IF_IN(B, X, Y, Z)
MINUS_IN(X, Y, Z) → U21(X, Y, Z, le_in(X, Y, B))

The TRS R consists of the following rules:

p_in(s(X), X) → p_out(s(X), X)
p_in(0, 0) → p_out(0, 0)
le_in(s(X), s(Y), B) → U1(X, Y, B, le_in(X, Y, B))
le_in(s(X), 0, false) → le_out(s(X), 0, false)
le_in(0, Y, true) → le_out(0, Y, true)
U1(X, Y, B, le_out(X, Y, B)) → le_out(s(X), s(Y), B)

The argument filtering Pi contains the following mapping:
le_in(x1, x2, x3)  =  le_in(x1)
s(x1)  =  s(x1)
U1(x1, x2, x3, x4)  =  U1(x4)
0  =  0
false  =  false
le_out(x1, x2, x3)  =  le_out(x3)
true  =  true
p_in(x1, x2)  =  p_in(x1)
p_out(x1, x2)  =  p_out(x2)
U41(x1, x2, x3, x4)  =  U41(x4)
MINUS_IN(x1, x2, x3)  =  MINUS_IN(x1)
IF_IN(x1, x2, x3, x4)  =  IF_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x1, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

U21(X, le_out(B)) → IF_IN(B, X)
U41(p_out(X1)) → MINUS_IN(X1)
IF_IN(false, X) → U41(p_in(X))
MINUS_IN(X) → U21(X, le_in(X))

The TRS R consists of the following rules:

p_in(s(X)) → p_out(X)
p_in(0) → p_out(0)
le_in(s(X)) → U1(le_in(X))
le_in(s(X)) → le_out(false)
le_in(0) → le_out(true)
U1(le_out(B)) → le_out(B)

The set Q consists of the following terms:

p_in(x0)
le_in(x0)
U1(x0)

We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

p_in(s(X)) → p_out(X)
le_in(s(X)) → U1(le_in(X))
le_in(s(X)) → le_out(false)
Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(IF_IN(x1, x2)) = x1 + x2   
POL(MINUS_IN(x1)) = 2·x1   
POL(U1(x1)) = 2·x1   
POL(U21(x1, x2)) = x1 + x2   
POL(U41(x1)) = x1   
POL(false) = 0   
POL(le_in(x1)) = x1   
POL(le_out(x1)) = 2·x1   
POL(p_in(x1)) = x1   
POL(p_out(x1)) = 2·x1   
POL(s(x1)) = 1 + 2·x1   
POL(true) = 0   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

U41(p_out(X1)) → MINUS_IN(X1)
U21(X, le_out(B)) → IF_IN(B, X)
IF_IN(false, X) → U41(p_in(X))
MINUS_IN(X) → U21(X, le_in(X))

The TRS R consists of the following rules:

p_in(0) → p_out(0)
le_in(0) → le_out(true)
U1(le_out(B)) → le_out(B)

The set Q consists of the following terms:

p_in(x0)
le_in(x0)
U1(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

U41(p_out(X1)) → MINUS_IN(X1)
U21(X, le_out(B)) → IF_IN(B, X)
IF_IN(false, X) → U41(p_in(X))
MINUS_IN(X) → U21(X, le_in(X))

The TRS R consists of the following rules:

le_in(0) → le_out(true)
p_in(0) → p_out(0)

The set Q consists of the following terms:

p_in(x0)
le_in(x0)
U1(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

U1(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

U21(X, le_out(B)) → IF_IN(B, X)
U41(p_out(X1)) → MINUS_IN(X1)
IF_IN(false, X) → U41(p_in(X))
MINUS_IN(X) → U21(X, le_in(X))

The TRS R consists of the following rules:

le_in(0) → le_out(true)
p_in(0) → p_out(0)

The set Q consists of the following terms:

p_in(x0)
le_in(x0)

We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

IF_IN(false, X) → U41(p_in(X))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(IF_IN(x1, x2)) = 2·x1 + x2   
POL(MINUS_IN(x1)) = 2·x1   
POL(U21(x1, x2)) = x1 + x2   
POL(U41(x1)) = x1   
POL(false) = 2   
POL(le_in(x1)) = x1   
POL(le_out(x1)) = 2·x1   
POL(p_in(x1)) = x1   
POL(p_out(x1)) = 2·x1   
POL(true) = 0   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ UsableRulesReductionPairsProof
QDP
                                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U41(p_out(X1)) → MINUS_IN(X1)
U21(X, le_out(B)) → IF_IN(B, X)
MINUS_IN(X) → U21(X, le_in(X))

The TRS R consists of the following rules:

le_in(0) → le_out(true)
p_in(0) → p_out(0)

The set Q consists of the following terms:

p_in(x0)
le_in(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 3 less nodes.